<%@ page import="java.util.ArrayList" %>
<%@ page import="com.itheima.domain.Student" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/11/12
  Time: 17:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>展示学生 </title>
    <style>
        table{
            width: 600px;
            border: 1px ;
            margin: auto;

        }


    </style>
</head>
<body>

<table  >
    <thead>
    <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>分数</th>
    </tr>
    </thead>
    <tbody align="center">


    <%
        ArrayList<Student> students = (ArrayList<Student>) request.getAttribute("students");
        for (Student student : students) {
    %>
    <tr>
        <td><%=student.getName()%></td>
        <td><%=student.getAge()%></td>
        <td><%=student.getScore()%></td>

    </tr>

    <%
        }

    %>
    </tbody>


</table>

</body>
</html>
